package com.ibeeking.found.upms.cs.rest.service;

import com.ibeeking.found.common.entity.LoginUserDTO;
import com.ibeeking.found.common.entity.UserInfoDTO;
import com.ibeeking.found.upms.api.common.query.AccountLoginQuery;
import com.ibeeking.found.upms.service.common.bo.CsUserBO;
import com.ibeeking.found.upms.service.common.param.CsUserParam;
import com.ibeeking.found.upms.service.common.param.ModifyMobileParam;
import com.ibeeking.found.upms.service.common.param.UserFindPwdParam;
import com.ibeeking.found.upms.service.common.param.UserModifyPwdParam;
import com.ibeeking.found.upms.service.common.query.CsUserPageQuery;
import com.ibeeking.found.upms.service.common.vo.CsUserPageVO;
import com.ibeeking.found.upms.service.common.vo.CsUserVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author ibeeking
 */
public interface ICsUserService {

    /**
     * 客服分页
     *
     * @param query
     * @return
     */
    Page<CsUserPageVO> pageList(CsUserPageQuery query);

    /**
     * 获取租户logo
     *
     * @return
     */
    String queryTenantLogo();

    /**
     * 修改商户用户
     *
     * @param param
     * @return
     */
    Boolean modifySelf(CsUserParam param);

    /**
     * 查看商户用户信息
     *
     * @param id
     * @return
     */
    CsUserVO view(Long id);

    CsUserBO queryById(Long id);

    /**
     * 修改商户用户密码
     *
     * @param userId
     * @param userModifyPwdParam
     * @return
     */
    Boolean modifyPwd(Long userId, UserModifyPwdParam userModifyPwdParam);

    /**
     * 修改用户密码
     *
     * @param userId
     * @param newPassword
     * @return
     */
    Boolean modifyPassword(Long userId, String newPassword);

    /**
     * 找回商户用户密码
     *
     * @param userFindPwdParam
     * @return
     */
    Boolean findPwd(UserFindPwdParam userFindPwdParam);

    /**
     * 登录查询
     *
     * @param query
     * @return
     */
    LoginUserDTO queryAccountLogin(AccountLoginQuery query);

    /**
     * 登录信息查询
     *
     * @param request
     * @param userId
     * @return
     */
    UserInfoDTO queryLoginUser(HttpServletRequest request, Long userId);

    Boolean modifyMobile(Long userId, ModifyMobileParam param);
}
